package com.xulu.romance.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xulu.romance.dao.ArticleDao;
import com.xulu.romance.pojo.Article;
import com.xulu.romance.service.ArticleService;
import com.xulu.romance.vo.ArchiveArticleVo;
import com.xulu.romance.vo.ArticleVo;
import com.xulu.romance.vo.QuestionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Author xiaoxulu
 * @Date 2024/1/13 21:53
 */

@Service
public class ArticelServiceImpl extends ServiceImpl<ArticleDao, Article> implements ArticleService {

    @Autowired
    private ArticleDao articleDao;

    @Override
    public Integer findArticleDetailCount() {
        return articleDao.findArticleDetailCount();
    }

    @Override
    public List<ArticleVo> findArticleDetail(Integer currentPage, Integer size) {
        return articleDao.findArticleDetail(currentPage, size);
    }

    @Override
    public List<ArticleVo> findArticleDetailCondition(Integer currentPage, Integer size, String key) {
        return articleDao.findArticleDetailCondition(currentPage, size, key);
    }

    @Override
    public List<ArticleVo> findAll() {
        return articleDao.findAll();
    }

    @Override
    public ArticleVo findArticleDetailById(Integer id) {
        return articleDao.findArticleDetailById(id);
    }

    @Override
    public List<ArticleVo> findArticleByTag(Integer currentPage, Integer size, Integer tagId) {
        return articleDao.findArticleByTag(currentPage, size, tagId);
    }

    @Override
    public Integer findArticleByTagCount(Integer tagId) {
        return articleDao.findArticleByTagCount(tagId);
    }

    @Override
    public List<ArchiveArticleVo> findArchiveArticleList(Integer currentPage, Integer size) {
        return articleDao.findArchiveArticleList(currentPage, size);
    }
}
